home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Utilities / GOCR / README < prev    next >
Text File  |  2000-05-29  |  8KB  |  183 lines

  1.                              
  2.                       --- GOCR v0.2.x ---
  3.  
  4. What is it?
  5. - OCR = optical character recognition
  6. - read pnm, pbm, pgm, ppm, some pcx and tga image files
  7. - output of text
  8.  
  9. How to compile?
  10.   
  11.   gzip -cd gocr_0_2_xx.tgz | tar xfv -   # extract the files
  12.   #  edit the Makefile if necessary
  13.   #  change option -O0 to -O2 (Makefile) for optimization
  14.   cd gocr_0_2    # change directory
  15.   make      # you need gcc/g++; other c++ compiler should work too
  16.  
  17.  
  18. How to start?
  19.   gocr -h           # help
  20.   gocr -i file.pbm    # minimum option 
  21.   gocr -v 1 -v 32 -m 4 -i file.pbm # layout analyzing and out30.bmp output
  22.  
  23. How to get image files?
  24. - scan text pages and save it as PGM/PBM file
  25. - you can use PNM-tools converting several image formats into pbm/pgm
  26. - djpeg can be used to convert jpeg into pgm
  27.   djpeg -grayscale -outfile file.pgm infile.jpg
  28. - generate your own using TeX+DVIPS+GS or other programs
  29. - generate my examples: make font1.pbm font2.pbm
  30.  
  31.                           WARNING!!!
  32.   If you use a 300dpi scan of A4 letter, the image is about 2500x3500
  33.   and gocr requires 8.75MB for storing the picture into the memory.
  34.   May be, the program needs a 2nd copy. As a result, gocr takes 17MB memory.
  35.   This is independent of using b/w or gray-scale images.
  36.   Be sure that you have enough RAM installed in your machine!
  37.   As a alternate way you can cut the picture into small pieces.
  38.   That can be done by:
  39.     jconv -shrink -pbm bigfile.pbm part1.pbm 0 0    0 1000;gocr -i part1.pbm
  40.     jconv -shrink -pbm bigfile.pbm part2.pbm 0 0 1000 1000;gocr -i part2.pbm
  41.     jconv -shrink -pbm bigfile.pbm part3.pbm 0 0 2000 1000;gocr -i part3.pbm
  42.  
  43. Dependencies:
  44.  - gcc,binutils (or other c-compiler)
  45.  - LaTeX,dvips,ghostscript to create pbm-examples
  46.  
  47. Features:
  48. - fonts 20-60 pixels ( 5pt * 1in/72pt * 300 dpi = 20 dots )
  49. - output of image file for controling detection
  50. - speed is very slow (this will be changed when recognition works well)
  51.   12pt 300dpi 1700x950 16lines 700chars 22x28 P90=40s..90s v0.2.3 (gcc -O0)
  52.   
  53.  
  54. What does >> NOT << work at the moment:
  55. - complex layouts (try option -m 4)
  56. - bad scanns, noisy/snowy images, FAX-quality images
  57. - serif fonts, italic fonts, slanted fonts
  58. - handwritten texts (this is valid for the next ten years)
  59. - rotated images but slightly rotated images should be no problem
  60. - small fonts (fax like) or mix of different font size
  61. - colored images (use black on white!)
  62. - chinese, arabian, agyptian, kyrillic or klingon fonts
  63. - using database (create_db is for developper tests)
  64.  
  65. How it works or how it should work?
  66. - put the entire file into RAM (300dpi grayscale recommended)
  67. - remove dust and snow
  68. - detect small angle (lines which are not horizontaly)
  69. - detect text boxes (option -m 4)
  70. - detect text-lines
  71. - detect characters
  72. - first step recognition (every character has its own empirical procedure)
  73.   - no neural network or similar general algorithms
  74. - analyze not detected chars by comparison with detected ones
  75. - try to divide overlapping letters
  76. - testwise: compare all letters (like compression of pictures)
  77. - for more details look to the ocr.tex documentation
  78.  
  79. How can I optimize the result?
  80. - make good scanns
  81. - try to change the critical gray level (option -l <n>)
  82. - control the result on out30.bmp (option -v 32)
  83. - enlarge option -d <n> for high resolution images which are noisy
  84. - try different combinations for option -m <n>
  85.  
  86. ToDo (no particular order):
  87. - frames should be recognized
  88. - rearange dust and line detection using box-list (will give speed up)
  89. - better character recognition of course (enter the top ten of OCR-PGs)
  90. - introduce propability and alternative chars
  91. - better distance function (comparision of characters)
  92. - detection of orientation (i.a. 90,180,270deg rotation)
  93. - learn mode (kind of database)
  94. - documentation, ocr.tex (How does this program work.)
  95. - x11-frontend (GTK+,TCL ???)
  96. - making a good interface for other applications
  97. - using dictonary (ispell)
  98. - switch to C or C++, what is better ???
  99. - picture extraction
  100. - making the code better readable
  101. - HTML (or other formatted) output
  102. - math formula detection, font type detection
  103. - set up a CVS server
  104. - feature extraction and classification (other engine)
  105.   that is the most difficult and most important task I think
  106. - improve performance (also parallel processing etc.)
  107. - handwritten texts
  108.    --- uff, realy a lot of work ---
  109. - Feel free and add your suggestions and wishes,
  110.   or tell me, what is the most importend point for you.
  111.  
  112. How can you help me?
  113. - Send comments, ideas and sources or SMALL example files as .pbm.gz or jpeg.
  114. - If you have a lot of money, spend a bit for a small notebook,
  115.   so I can improve the program everywhere.
  116.   I am also interested on buying a cheap mininotebook (6-10"TFT,ext. CD+FD via USB).
  117. - At the moment I really need example files (.pbm.gz or jpeg <100kB) for testing
  118.   the behavior of the ocr engine under different conditions, 
  119.   because scanning does take a lot of time which I do not have.
  120.   But do not send files, which are not convertable by commercial ocr programs
  121.   or which are protected for copying and electronic processing by copyright.
  122.   That will help, to get the world best OCR open source program. :) Thanks!
  123. - Send me your results (errors,num_chars,dpi) and if possible results
  124.   and name of professional OCR programs for statistics.
  125.  
  126. History: (Changes)
  127. - v0.1   project started (not documented), summer 1999
  128. - v0.2   line scanning added
  129.   v0.2.1 first official release on freshmeat.net March 2000
  130.   v0.2.2 gocr_0_2.tgz expands into gocr_0_2 directory (thanks to zz99zz)
  131.          engine upgraded a bit, some bugs fixed (umlaut, thin lines)
  132.          short documentation added (ocr.tex)
  133.          colored output (out30.bmp) for test/development-mode
  134.          - read ASC-PBM and PCX (1 bit) were buggy
  135.   v0.2.3 some layout analysis (very slowly, try -m 4)
  136.          engine modified, ... still a lot to do
  137.   v0.2.3b better (?) distance function, engine updated
  138.          - database added for testing
  139.          1000 downloads counted !!! May 2000
  140.   v0.2.4 three char division (connected chars), dust removing
  141.   v0.2.4a2 some details are added (better dust removing and char division)
  142.   v0.2.4a3 convert renamed to jconv
  143.          lot of people is happy about the program, a good motivation for me ;)
  144.   v0.2.4a4 you can choose stdin as input now,
  145.          that gives you full power of conversion tools
  146.          example: djpeg -pnm -gray text.jpg | gocr -i -
  147.  
  148.     
  149.  
  150. Bugs:
  151.         Please do not hesitate to report every errors!
  152.                And if possible its fixes!
  153.              Good ideas are always welcome!
  154. - if you send me a example file, please only use XXXXX.pbm.gz
  155. - v0.2.1
  156.   - some people has problems running gocr on DOS/Win95
  157.     I guess: stack overflow. Is someone able to analyze or fix this?
  158.   - large black areas on pbm-files cause a segfault on
  159.     Ultra/Sparc (64bit) machines running Linux (2.1.126).
  160.     There is a rekursive function in the program which causes a
  161.     stack overflow, which is not detected by the linux-kernel (BUG?).
  162.     I look for a better solution.
  163. - v0.2.3 still problems with segmentation
  164.   - gcc 2.95.2 (SuSE6.4) error in load_db(), => fixed (thx to jasper)
  165. - v0.2.4 I guess, there are still bugs.
  166.  
  167. Latest news:
  168.   http://altmark.nat.uni-magdeburg.de/~jschulen/ocr/index.html
  169.  
  170. Authors:
  171.   Joerg.Schulenburg@physik.uni-magdeburg.de
  172.  
  173. Thanks:
  174.   ...to everyone who contributed to gocr. If you feel that your
  175.   name should be in this list, write mail to the author. These
  176.   are in no particular order:
  177.  
  178.     G.Kugler for sending me example files and testing. (MaiMM)
  179.     ...
  180.  
  181.   ... and everyone else who submitted bug-reports,
  182.   feature-requests and patches.
  183.